<?php

namespace App\Models;

use App\Models\System\Region;
use Illuminate\Database\Eloquent\Model;

class Link extends Model
{
    protected $table = 'link_url';

    protected $fillable = [
        'region_id',
        'name',
        'url',
        'status'
    ];

    protected $casts = [
        'status' => 'boolean'
    ];

    public function region()
    {
        return $this->hasOne(Region::class, 'id', 'region_id');
    }
}
